package bill.study.concurrency.executorframework;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class ReliableWebServer {
	static Executor pool = 
		Executors.newFixedThreadPool(7);
	
	public static void main(String [] args){
		try {
			ServerSocket socket = new ServerSocket(80);
			while (true){
				final Socket connection =  socket.accept();
				Runnable runnable = new Runnable(){
					public void run(){
						//handleRequest(connection);
					}
				};
				pool.execute(runnable);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
